/*
 * DialogHelp.java
 *
 * Created on 12. duben 2008, 19:23
 */

package jgaf.automaton.pda;

/**
 *
 * @author  hanis
 */
public class DialogHelp extends javax.swing.JDialog {
    

   public static final int ABOUT = 0;
    
    
    public DialogHelp(java.awt.Frame parent, String message) {
        super(parent, true);
        initComponents();
        setLocationRelativeTo(parent);  
        setTitle(L12N.getValue("warn.help"));
      //  DesignManipulation.getInstance().setDesign(this.getContentPane());
        area.setText(message);
        setVisible(true);
    }
    
    
    public DialogHelp(java.awt.Dialog parent, String message) {
        super(parent, true);
        initComponents();
        setLocationRelativeTo(parent); 
        setTitle(L12N.getValue("warn.help"));
      //  DesignManipulation.getInstance().setDesign(this.getContentPane());
        area.setText(message);
        setVisible(true);
    }    
    
    
    public DialogHelp(java.awt.Frame parent, String message, int mode) {
        super(parent, true);
        initComponents();
        setLocationRelativeTo(parent);       
        if(mode == ABOUT) {
            setTitle(L12N.getValue("menu.help.about"));
        }
  //      DesignManipulation.getInstance().setDesign(this.getContentPane());
        area.setText(message);
        setVisible(true);        
    }        
    

    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jScrollPane1 = new javax.swing.JScrollPane();
        area = new javax.swing.JTextArea();
        butBack = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        area.setColumns(20);
        area.setLineWrap(true);
        area.setRows(5);
        area.setWrapStyleWord(true);
        jScrollPane1.setViewportView(area);

        butBack.setText(java.util.ResourceBundle.getBundle("pdasimulator/localization").getString("freq.back"));
        butBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butBackActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, butBack, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(butBack))
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void butBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butBackActionPerformed
        dispose();
    }//GEN-LAST:event_butBackActionPerformed
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea area;
    private javax.swing.JButton butBack;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
    
}
